package com.demo.enums;

/**
 * 住院类型  1.在院  2.出院
 */
public enum PatientHospitalTypeEnum {
    IN_HOSPITAL(1, "在院"),
    OUT_HOSPITAL(2, "出院");

    private int value;
    private String desc;

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    PatientHospitalTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static PatientHospitalTypeEnum getByValue(Integer value) {
        for (PatientHospitalTypeEnum item : values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        return null;
    }
}
